package utils;

import java.io.Serializable;
import java.util.HashMap;


public class ManagingMessage implements PropertiesMap, Serializable {

	private static final long serialVersionUID = -7782279038118794776L;


	public ManagingMessage (Type type) {
		this.type = type;
	}
	
	private Type type;
	private HashMap<String, Object> properties = new HashMap<String, Object>();
	

	public Type getType () {
		return type;
	}
	
	@Override
	public void putProperty (String propertyName, Object value) {
		properties.put(propertyName, value);
	}
	
	
	@Override
	public Object getProperty (String propertyName) {
		return properties.get(propertyName);
	}
	
	
	@Override
	public void purgeProperty (String propertyName) {
		properties.remove(propertyName);
	}
	
	public enum Type {
		LOGIN_REQUEST, LOGIN_ACK, LOGOFF_REQUEST, USER_DATA_REQUEST, USER_DATA_ACK, LIFE_TEST_REQUEST, LIFE_TEST_ACK,
		CHANGE_STATE_REQUEST, CHANGE_STATE_ACK, CURRENT_SITUATION, BROADCAST_MESSAGE,  SUPPORT_DOCUMENT, SUPPORT_DOCUMENT_ACK;
	}

	
}
